import request from './request'
export const getAllcategories = () => {
  return request({
    url: '/api/tabs',
    method: 'get'
  }).then(res => {
    const list = res.list.slice(1)
    return list
  })
}

// 涉及id传参 ：动态路由匹配 :id
export const getSubCategories = id => request({
  url: '/api/tab/' + id,
  method: 'get'
}).then(res => res.categories)
